<!--#include File="../../Config/Config.asp"-->
<!--#include File="../../Include/Class_Xml.asp"-->
<%
action = request.QueryString("action")
if action = "NewsInfo" then
	id = request.QueryString("id")
	if not IsNumeric(id) then
		response.Write("传递参数出错！")
		response.End()
	end if	
	rssitem	=	"<?xml version=""1.0"" encoding=""UTF-8""?>"&vbcrlf
	rssitem	=	rssitem	&" <document>"&vbcrlf
	set rs = server.CreateObject("ADODB.Recordset")
	sqlstr = "select top 1 id,NewsTitle,NewsContent,PostTime from NewsInfo where NewsLock=0 and id="&id
	rs.open sqlstr,conn,1,1
	rssitem = rssitem & "<itemcount>"&rs.recordcount&"</itemcount>"&vbcrlf
	do until rs.eof 
		RowStr = "id,NewsTitle,NewsContent,PostTime"
		rssitem = rssitem & "<item>"&vbcrlf
		rssitem = rssitem & getRowItem(rs,RowStr)&vbcrlf
		rssitem = rssitem & "  </item>"&vbcrlf
		rs.movenext
	loop
	rs.close
	set rs = nothing
	rssitem = rssitem & "  </document>"&vbcrlf
	response.Write(rssitem)
end if
if action = "NewsInfoList" then
	id = request.QueryString("id")
	rssitem	=	"<?xml version=""1.0"" encoding=""UTF-8""?>"&vbcrlf
	rssitem	=	rssitem	&" <document>"&vbcrlf
	set rs = server.CreateObject("ADODB.Recordset")
	sqlstr = "select id,NewsTitle,PostTime from NewsInfo where NewsLock=0 order by id desc"
	rs.open sqlstr,conn,1,1
	rssitem = rssitem & "<itemcount>"&rs.recordcount&"</itemcount>"&vbcrlf
	do until rs.eof 
		RowStr = "id,NewsTitle,PostTime"
		rssitem = rssitem & "<item>"&vbcrlf
		rssitem = rssitem & getRowItem(rs,RowStr)&vbcrlf
		rssitem = rssitem & "  </item>"&vbcrlf
		rs.movenext
	loop
	rs.close
	set rs = nothing
	rssitem = rssitem & "  </document>"&vbcrlf
	response.Write(rssitem)
end if
call closeconn()
%>